package com.ydl.shopping.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydl.shopping.core.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/** 订单详情表 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tb_order_detail")
@Schema(name = "订单详情表")
public class TbOrderDetail extends BaseEntity {
    /** 订单编号 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("order_id")
    @Schema(description = "订单编号")
    private Long orderId;

    /** 商品编号 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("goods_id")
    @Schema(description = "商品编号")
    private Long goodsId;

    /** 下单数量 */
    @TableField("quantity")
    @Schema(description = "下单数量")
    private Integer quantity;

    /** 单价 */
    @TableField("unit_price")
    @Schema(description = "单价")
    private BigDecimal unitPrice;
}
